import React,{lazy,Suspense} from 'react';
import {Redirect, Route, Switch} from "react-router-dom";
import Loading from "./components/Loading/Loading";
const InApp = lazy(() => import('./pages/InApp/InApp'))
const LAR = lazy(() => import('./pages/Login&Reg/LoginAndReg'))
function App() {
  return (
    <div className="App">
        <Suspense fallback={(<Loading />)}>
            <Switch>
                <Route path='/in' component={InApp} />
                <Route path='/goIn' component={LAR}/>
                <Redirect to='/goIn'/>
            </Switch>
        </Suspense>
    </div>
  );
}

export default App;
